<!--弹框组件-->
<div id="model" ng-show="show">
    <div class="modal-dialog" ng-if="show" draggable>
        <!--头部-->
        <div class="modal-header">
            <h5 class="modal-title" ng-bind="name"></h5>
            <button type="button" class="close" ng-click="closePopUp()">&times;</button>
        </div>
        <!--主体内容-->
        <div class="modal-body" ng-style="{ height: ( height || 'auto' ) }">
            <!-- 错误提示-->
            <div class="error" ng-if="tip">
                <i>*</i><span ng-bind="tip"></span>
            </div>
            <!--遍历入参-->
            <div ng-repeat="item in list">
                <!--如果只是展示一段文本提示-->
                <div class="center" ng-if="item.type == 'toast'" ng-bind="item.value"></div>
                <text ng-if="item.type == 'text'" list="item.list"></text>
                <app-text-group ng-if="item.type == 'text-group'" list="item.list"></app-text-group>
                <app-input ng-if="item.type == 'readonly'" name="item.name" label="{{item.label}}" ng-model="item.value" readonly="'readonly'" placeholder="{{item.placeholder}}"></app-input>
                <app-input ng-if="item.type == 'input'" must="item.must" name="item.name" label="{{item.label}}" ng-model="item.value" placeholder="{{item.placeholder}}"></app-input>
                <app-input type="password" ng-if="item.type == 'password'" must="item.must" name="item.name" label="{{item.label}}" ng-model="item.value" placeholder="{{item.placeholder}}"></app-input>
                <app-input type="textarea" must="item.must" ng-if="item.type == 'textarea'" name="item.name" label="{{item.label}}" ng-model="item.value" placeholder="{{item.placeholder}}"></app-input>
                <app-radio ng-if="item.type == 'radio'" must="item.must" name="item.name" ng-model="item.value" label="{{item.label}}" list="item.list"></app-radio>
                <app-radio-group ng-if="item.type == 'radio-group'" must="item.must" name="item.name" ng-model="item.value" list="item.list"></app-radio-group>
                <app-checkbox ng-if="item.type == 'checkbox'" must="item.must" name="item.name" ng-model="item.value" label="{{item.label}}" list="item.list"></app-checkbox>
                <app-checkbox-group ng-if="item.type == 'checkbox-group'" must="item.must" name="item.name" ng-model="item.value" label="{{item.label}}" list="item.list"></app-checkbox-group>
            </div>
        </div>
        <!--页尾-->
        <div class="modal-footer">
            <button type="button" class="btn" ng-click="closePopUp()">{{button[0]? button[0]: '取消'}}</button>
            <button type="button" class="btn" ng-click="on()">{{button[1]? button[1]: '提交'}}</button>
        </div>
    </div>
</div>